package linkedList;

public class Main {
    public static void main(String[] args) {
        LinkedList<String> lista = new LinkedList<String>();
        for (int i = 0; i <= 5; i++) {
            lista.insert(i, new String((char) ('A' + i) + ""));
        }
        System.out.println("list: " + lista.toString() + "，length()=" + lista.length());
        System.out.println("set value...");
        lista.set(3, new String((char) (lista.get(0).charAt(0) + 32) + ""));
        // lista.set(3, "x");
        System.out.println("list: " + lista.toString() + "，length()=" + lista.length());
        lista.remove(0);
        lista.remove(2);
        lista.remove(10); // 抛出异常
        System.out.println("list: " + lista.toString());
    }
}
